import rxAjax from '@/assets/js/ajax.js';

//权限转移日志表 api接口
export const SysTransferLogApi = {};

SysTransferLogApi.baseUrl = '/api-system/system/core/sysTransferLog';
SysTransferLogApi.exportUrl = SysTransferLogApi.baseUrl + '/listExport';

//查询列表
SysTransferLogApi.query = function (parameter) {
  var url = SysTransferLogApi.baseUrl + '/query';
  return rxAjax.postJson(url, parameter).then(res => {
    return res.result
  })
}

/**
 * 获取单记录
 * @param pkId
 * @returns {*}
 */
SysTransferLogApi.get = function (pkId) {
  var url = SysTransferLogApi.baseUrl + '/get?pkId=' + pkId;
  return rxAjax.get(url);
}

SysTransferLogApi.getUser = function (pkId) {
  var url = SysTransferLogApi.baseUrl + '/getUser?pkId=' + pkId;
  return rxAjax.get(url);
}

//保存数据
SysTransferLogApi.save = function (parameter) {
  var url = SysTransferLogApi.baseUrl + '/save';
  return rxAjax.postJson(url, parameter);
}

//删除数据
SysTransferLogApi.del = function (parameter) {
  var url = SysTransferLogApi.baseUrl + '/del';
  return rxAjax.postUrl(url, parameter);
}

export default SysTransferLogApi;

